module.exports = class PromptModuleAPI {
 // 入参creator 为Creator的实例
 constructor(creator) {
  this.creator = creator
 }

 // 给featurePrompt注入复选框值
 injectFeature(feature) {
  this.creator.featurePrompt.choices.push(feature)
 }

  // 给injectedPrompts注入选项
 injectPrompt(prompt) {
  this.creator.injectedPrompts.push(prompt)
 }

 injectOptionForPrompt(name, option) {
  this.creator.injectedPrompts.find(f=> {
    return f.name === name
  }).choices.push(option)
 }

 // 注入回调
 onPromptComplete(cb) {
  this.creator.promptCompleteCbs.push(cb)
 }
 

}